import { getProxyPath } from '../config/proxyPath'
import { createRequest } from '../utils/request'
const baseURL = getProxyPath('dataDictionary')
const request = createRequest({ baseURL })

/**
 * 字典配置-陈
 */

// 拉取列表
export function getPage(data) {
  return request.postJson('/sysDictionaryApi/getList', data)
}
// 数据字典新增
export function webConfigAddition(data) {
  return request.postJson('/sysDictionaryApi/addition', data)
}
// 获取详情
export function webConfigGetById(data) {
  return request.postJson(`/sysDictionaryApi/getById?${data}`)
}
// 更新字典
export function webConfigUpdate(data) {
  return request.postJson('/sysDictionaryApi/update', data)
}
// 删除字典
export function webConfigDelete(data) {
  return request.postJson(`/sysDictionaryApi/delete?${data}`)
}
// 拉取数据字典
export function getDictory(data) {
  return request.postJson('/sysDictionaryApi/getDictory?tableName=so_accident', data)
}
/**通过用户名获取手机号 */
export function getUserMobileByUserName(data) {
  return request.postFormUrl('/sysUserApi/getUserMobileByUserName', data)
}
// 登录取手机验证码
export function loginSendCode(data) {
  return request.postFormUrl('/sysViewUserApi/sendAuthCode', data)
}
